package com.qiongqi.datadir.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.qiongqi.datadir.envm.DataStatus;
import com.qiongqi.datadir.envm.UsageMode;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.Instant;
import java.util.List;

/**
 * 数据提供合约
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class DataProvContract extends BaseDomain{
    private String resName;   // 如 "s3://tds-space-a001/B/epidemiology_data.csv"
    private String resId;   // 如 "s3://tds-space-a001/B/epidemiology_data.csv"
    private List<String> authorizedPurposes; // ["research.rare_disease"]
    private Instant startTime;
    private Instant endTime;
    private String usageMode; // CALCULATE, VIEWONLY
    private String status; // ACTIVE, REVOKED
    private List<String> compliances; // ["GDPR", "HIPAA"]
    private boolean revocable = true;
    private List<String> dataProvEncFields;
}
